<template>
  <div class="content">
    <MyProfile></MyProfile>
<!--    <div class="business-content">-->
<!--      <div class="page-content-top">-->
<!--        <Step :step="['创建名片','实名认证','授权认证','认证审核']" :active="3"></Step>-->
<!--      </div>-->
<!--      <div class="form-content">-->
<!--        <el-form label-position="right" :model="form" :rules="rules" ref="form" label-width="130px">-->
<!--          <el-form-item label="企业名称">-->
<!--            <el-input v-loading="formLoading" v-model="comName" :disabled="true"></el-input>-->
<!--          </el-form-item>-->
<!--          <el-form-item label="营业执照" prop="upLicense" required>-->
<!--            <el-upload-->
<!--                class="avatar-uploader"-->
<!--                :show-file-list="false"-->
<!--                :limit="1"-->
<!--                :action="uploadUrl"-->
<!--                :on-success="handleAvatarSuccess1"-->
<!--                :on-exceed="onExceed"-->
<!--                :before-upload="beforeAvatarUpload">-->
<!--              <img v-if="form.upLicense" :src="form.upLicense" class="avatar">-->
<!--              <i v-else class="el-icon-plus avatar-uploader-icon"></i>-->
<!--            </el-upload>-->
<!--          </el-form-item>-->
<!--          <el-form-item label="企业招聘授权书" prop="upRecruit" required>-->
<!--            <el-upload-->
<!--                class="avatar-uploader"-->
<!--                :limit="1"-->
<!--                :action="uploadUrl"-->
<!--                :show-file-list="false"-->
<!--                :on-success="handleAvatarSuccess2"-->
<!--                :on-exceed="onExceed"-->
<!--                :before-upload="beforeAvatarUpload">-->
<!--              <img v-if="form.upRecruit" :src="form.upRecruit" class="avatar">-->
<!--              <i v-else class="el-icon-plus avatar-uploader-icon"></i>-->
<!--            </el-upload>-->
<!--          </el-form-item>-->
<!--          <el-form-item label="身份证人像面" prop="idCardJust" required>-->
<!--            <el-upload-->
<!--                class="avatar-uploader"-->
<!--                :action="uploadUrl"-->
<!--                :limit="1"-->
<!--                :show-file-list="false"-->
<!--                :on-success="handleAvatarSuccess3"-->
<!--                :on-exceed="onExceed"-->
<!--                :before-upload="beforeAvatarUpload">-->
<!--              <img v-if="form.idCardJust" :src="form.idCardJust" class="avatar">-->
<!--              <i v-else class="el-icon-plus avatar-uploader-icon"></i>-->
<!--            </el-upload>-->
<!--          </el-form-item>-->
<!--          <el-form-item label="身份证国徽面" prop="idCardBack" required>-->
<!--            <el-upload-->
<!--                class="avatar-uploader"-->
<!--                :action="uploadUrl"-->
<!--                :limit="1"-->
<!--                :show-file-list="false"-->
<!--                :on-success="handleAvatarSuccess4"-->
<!--                :on-exceed="onExceed"-->
<!--                :before-upload="beforeAvatarUpload">-->
<!--              <img v-if="form.idCardBack" :src="form.idCardBack" class="avatar">-->
<!--              <i v-else class="el-icon-plus avatar-uploader-icon"></i>-->
<!--            </el-upload>-->
<!--          </el-form-item>-->
<!--          <el-button style="margin: 30px auto;display: block" type="primary" @click="submit">下一步</el-button>-->
<!--        </el-form>-->
<!--      </div>-->
<!--    </div>-->
  </div>
</template>

<script>
// import Step from "@/components/Step/Step";
// import {addComTwo, getEnterpriseData} from "@/api/enterprise";
// import {submitEducation} from "@/api/mineCenter";

import MyProfile from "@/components/MineCenter/Enterprise/MyProfile";

export default {
  components: { MyProfile},
  // data() {
  //   return {
  //     formLoading: false,
  //     comName: '',
  //     form: {
  //       upLicense: '',
  //       upRecruit: '',
  //       idCardJust: '',
  //       idCardBack: '',
  //     },
  //     uploadUrl: process.env.VUE_APP_UPLOAD_API + '?uploadType=2',
  //     rules: {
  //       upLicense: [
  //         {required: true, message: '请上传营业执照', trigger: 'blur'},
  //       ],
  //       upRecruit: [
  //         {required: true, message: '请上传企业招聘授权书', trigger: 'blur'}
  //       ],
  //       idCardJust: [
  //         {required: true, message: '请上传身份证人像面', trigger: 'blur'},
  //       ],
  //       idCardBack: [
  //         {required: true, message: '请上传身份证国徽面', trigger: 'blur'}
  //       ],
  //     }
  //   }
  // },
  // methods: {
  //   handleAvatarSuccess1(e){
  //     this.form.upLicense=e.data;
  //   },
  //   handleAvatarSuccess2(e){
  //     this.form.upRecruit=e.data;
  //   },
  //   handleAvatarSuccess3(e){
  //     this.form.idCardJust=e.data;
  //   },
  //   handleAvatarSuccess4(e){
  //     this.form.idCardBack=e.data;
  //   },
  //   beforeAvatarUpload(file) {
  //     const fileNameArr = file.name.split('.');
  //     const fileExt = fileNameArr[fileNameArr.length - 1];
  //     const accept = ['jpg','jpeg','png'];
  //     if (accept.length > 0 && !accept.includes(fileExt)) {
  //       this.$message.error(`上传文件的格式不允许,只允许上传${this.acceptText}格式`);
  //       return;
  //     }
  //     const maxSize=1024 * 1024 * 2;
  //     if (file.size > maxSize) {
  //       this.$message.error(`上传的文件大小超过限制，允许上传${(maxSize / 1024 / 1024)}M`);
  //     }
  //   },
  //   onExceed() {
  //     this.$message.error(`上传数量超过限制，最多只能上传1个`)
  //   },
  //   submit() {
  //     this.$refs['form'].validate((valid) => {
  //       if (valid) {
  //         if(this.formLoading){
  //           this.$message.warning('请等待加载完成');
  //           return;
  //         }
  //         const loading=this.$loading({text:'加载中'})
  //         addComTwo(this.form).then(() => {
  //           this.$message.success('保存成功');
  //           this.$store.dispatch('user/getUser').finally(() => {
  //             this.$router.push({path: '/enterprise/authorization/examine'})
  //           });
  //         }).finally(() => {
  //           loading.close()
  //         })
  //       }
  //     });
  //   },
  //   getEnterprise() {
  //     this.formLoading = true
  //     getEnterpriseData({}).then((res) => {
  //       this.comName = res.comName;
  //     }).finally(() => {
  //       this.formLoading = false
  //     })
  //   }
  // },
  // mounted() {
  //   this.getEnterprise()
  // }
}
</script>

<style lang="scss" scoped>
.content {
  width: $contentWidth;
  min-height: $fullMinHeight;
  margin: 0 auto;
  overflow: hidden;
  padding: 20px 0;
  .business-content {
    background-color: #FFFFFF;
    width: 100%;
    overflow: hidden;
  }
  .form-content{
    width: 50%;
    margin: 0 auto;
  }
}
.avatar-uploader .el-upload {
  border: 1px dashed #d9d9d9;
  border-radius: 6px;
  cursor: pointer;
  position: relative;
  overflow: hidden;
}
.avatar-uploader .el-upload:hover {
  border-color: #409EFF;
}
.avatar-uploader-icon {
  font-size: 28px;
  color: #8c939d;
  width: 178px;
  height: 178px;
  line-height: 178px;
  text-align: center;
  border: 1px solid #efefef;
  border-radius: 5px;
}
.avatar {
  width: 178px;
  height: 178px;
  display: block;
}
</style>
